package com.kotiln.lgc.sunnyweather.base

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.viewbinding.ViewBinding

/**
 *@fileName BaseActivity
 *@date2020/11/25  16:44
 *@author BaseActivity$
 *@describe TODO
 *@desc
 */
abstract class BaseActivity<T:ViewBinding>:AppCompatActivity() {
    private lateinit var _binding:T
    protected val binding get() =_binding

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        _binding=getViewBinding()
        //setContentView(initLayout())
        setContentView(_binding.root)
        initData()
    }
//    abstract fun initLayout():Int
    abstract fun initData()
    protected abstract fun getViewBinding():T


}



